package backend

import "github.com/gogf/gf/v2/frame/g"

type IndexReq struct {
	g.Meta `path:"/" method:"get" summary:"主页" tags:"主页"`
}

type IndexRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

type HomeReq struct {
	g.Meta `path:"/index/home" method:"get" summary:"首页" tags:"主页"`
}

type HomeRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

type ThemeReq struct {
	g.Meta `path:"/index/theme" method:"get" summary:"主题" tags:"主页"`
}

type ThemeRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

type NoteReq struct {
	g.Meta `path:"/index/note" method:"get" summary:"便签" tags:"主页"`
}

type NoteRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

type UploadFileReq struct {
	g.Meta `path:"/common/upload-file" method:"post" summary:"上传文件" tags:"主页"`
}

type UploadFileRes struct {
	Name string `json:"name"`
	Path string `json:"path"`
	Url  string `json:"url"`
}

type DeleteFileReq struct {
	g.Meta `path:"/common/delete-file" method:"post" summary:"删除文件" tags:"主页"`
	Urls   []string `json:"urls" v:"required#要删除文件缺失"   dc:"文件集合"`
}

type DeleteFileRes struct {
	Flag bool `json:"flag"`
}

// bas64上传文件

type Base64UploadFileReq struct {
	g.Meta   `path:"/common/base64-file" method:"post" summary:"bas64上传文件" tags:"主页"`
	BaseCode string `json:"base_code" v:"required#请上传base64编码"   dc:"base64编码"`
}

type Base64UploadFileRes struct {
	UploadFileRes
}
